package com.itheima.utils;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import com.mchange.v2.c3p0.ComboPooledDataSource;

public class JDBCUtils {

	private final static ComboPooledDataSource DATASOURCE = new ComboPooledDataSource();

	public static DataSource getDataSource(){
		
		return DATASOURCE;
	}
	
	public static Connection getConnection() throws SQLException{
		return DATASOURCE.getConnection();
	}
}
